import request from '@/utils/request'
const BASE_URL = '/well/survey'
// 数据补全
export function completion(query) {
    return request({
        url: BASE_URL + '/completion',
        method: 'get',
        params: query
    })
}
// 测井详细记录
export function queryOne(id) {
    return request({
        url: BASE_URL + "/" + id,
        method: "get",
    });
}

export function queryList(query) {
    return request({
        url: BASE_URL,
        method: 'get',
        params: query
    })
}
// 更新测井记录
export function updateSurOne(data) {
    return request({
        url: BASE_URL + '/update',
        method: 'put',
        data: data
    })
}
// 删除部门
export function deleteOne(id) {
    return request({
        url: BASE_URL + '/' + id,
        method: 'delete'
    })
}
// 修改部门
export function updateOne(data) {
    return request({
        url: BASE_URL,
        method: 'put',
        data: data
    })
}

// 获取插值数据
// export function getInterpolation(query){
//     return request({
//         url: BASE_URL + '/interpolation',
//         method: 'get',
//         params: query
//     })
// }

// 测井信息导入
export function uploadFile(data) {
    return request({
        url: BASE_URL + '/import',
        method: 'post',
        data: data
    })
}

export function latestSurvey(wellId) {
    return request({
        url: "/well/" + wellId + "/survey/latest",
        method: "get",
    });
}

// 新增造斜点
export function addSkew(data) {
    return request({
        url: BASE_URL + '/skew',
        method: 'put',
        data: data
    })
}
// 直井导入
export function CreateVert(data) {
    return request({
        url: BASE_URL + '/vertical/creat',
        method: 'post',
        data: data
    })
}
export default {
    latestSurvey,
    completion,
    queryOne,
    queryList,
    deleteOne,
    updateSurOne,
    uploadFile,
    addSkew,
    CreateVert
}